package edu.gdut.tiantian.entity;

public class OrderItem {
	private Product product;
	private Integer buyNum;
	private Float money;
	public Product getProduct() {
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	public Integer getBuyNum() {
		return buyNum;
	}
	public void setBuyNum(Integer buyNum) {
		this.buyNum = buyNum;
	}
	public Float getMoney() {
		money = product.getPrice() * buyNum;
		return money;
	}
	public void setMoney(Float money) {
		this.money = money;
	}
	@Override
	public String toString() {
		return "OrderItem [product=" + product + ", buyNum=" + buyNum + ", money=" + money + "]";
	}
}
